<template>
  <div class="work-order-block">
    <div class="block-header">
      <span class="block-title">工单处理</span>
    </div>
    <div class="work-order-content">
      <div class="work-order-table">
        <div class="work-order-row work-order-row-head">
          <span>工单号</span>
          <span>类型</span>
          <span>状态</span>
          <span>时间</span>
          <span>操作</span>
        </div>
        <div class="work-order-row" v-for="item in orders" :key="item.id">
          <span>{{ item.id }}</span>
          <span>{{ item.type }}</span>
          <span :class="['status', item.status]">
            <i class="status-dot"></i>{{ item.statusText }}
          </span>
          <span>{{ item.time }}</span>
          <span>
            <button class="btn-detail">详情</button>
          </span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const orders = [
  { id: 'GD20240601', type: '维修', status: 'doing', statusText: '处理中', time: '2025-06-08 09:00' },
  { id: 'GD20240602', type: '巡检', status: 'done', statusText: '已完成', time: '2025-06-08 08:40' },
  { id: 'GD20240603', type: '报警', status: 'todo', statusText: '待处理', time: '2025-06-08 08:20' },
]
</script>

<style scoped>
.work-order-block {
  background: rgba(20,40,80,0.92);
  border-radius: 22px;
  box-shadow: 0 4px 32px #00eaff44, 0 2px 12px #0008;
  padding: 0 0 18px 0;
  position: relative;
  overflow: hidden;
}
.block-header {
  height: 10px;
  background: linear-gradient(90deg, #00eaff 0%, #1e3c5a 100%);
  border-radius: 22px 22px 0 0;
  margin-bottom: 12px;
}
.block-title {
  position: absolute;
  top: 16px;
  left: 32px;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  z-index: 2;
  text-shadow: 0 0 6px #00eaff, 0 2px 8px #1e3c5a;
}
.work-order-content {
  padding: 38px 18px 0 18px;
}
.work-order-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.work-order-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #fff;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,234,255,0.08);
  position: relative;
}
.work-order-row-head {
  font-weight: bold;
  color: #00eaff;
  font-size: 16px;
  border-bottom: 2px solid #00eaff44;
}
.status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 0 8px #00eaff33;
  border: 1.5px solid #00eaff88;
  background: linear-gradient(90deg, #00eaff22 0%, #1e3c5a22 100%);
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 2px;
  background: #00eaff;
  box-shadow: 0 0 6px #00eaff;
}
.status.doing {
  color: #00eaff;
  border-color: #00eaff;
  background: linear-gradient(90deg, #00eaff33 0%, #1e3c5a22 100%);
}
.status.doing .status-dot {
  background: #00eaff;
}
.status.done {
  color: #00ff88;
  border-color: #00ff88;
  background: linear-gradient(90deg, #00ff8833 0%, #1e3c5a22 100%);
}
.status.done .status-dot {
  background: #00ff88;
}
.status.todo {
  color: #ffb300;
  border-color: #ffb300;
  background: linear-gradient(90deg, #ffb30033 0%, #1e3c5a22 100%);
}
.status.todo .status-dot {
  background: #ffb300;
}
.btn-detail {
  background: linear-gradient(90deg, #00eaff 0%, #1e3c5a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 18px;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 0 8px #00eaff44;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-detail:hover {
  background: linear-gradient(90deg, #1e3c5a 0%, #00eaff 100%);
  color: #00eaff;
}
</style> 
